<div class="ten-process all-join" id="all-join">
    <div class="{% unless section.settings.full_width %}page-width{% endunless %}">
        {%- if section.settings.heading != blank -%}
         <div class="process-title">
          <div class="title">
            {{ section.settings.heading | escape }}
         </div> 
            {%- if section.settings.text != blank -%}
                <div class="rte">{{ section.settings.text }}</div>
            {%- endif -%}
         </div> 
       {%- endif -%}

      <div class="join_are">
        {%- for block in section.blocks -%}
        {% case block.type %}
        {%- when 'job' -%}
           <a class="tenways-time" target="_blank" {% if block.settings.button_link != blank %} href="{{ block.settings.button_link }}"{% endif %} {% if block.settings.button_link == blank %} aria-disabled="true"{% endif %} {{ block.shopify_attributes }}>
            <ul class="pc-join">
                <li> {{ block.settings.title | escape }}</li>
                <li> {{ block.settings.department | escape }}</li>
                <li> {{ block.settings.location | escape }}</li>
            </ul>
            <div class="mb-join">
                <h3>{{ block.settings.mb_title | escape }}</h3>
                <p>{{ block.settings.mb_department | escape }}</p>
            </div>
           </a>
        {%- when 'text' -%}
        <h3 {{ block.shopify_attributes }}>{{ block.settings.text | escape }}</h3>
        {%- endcase -%}
        {%- endfor -%}
      </div>
    </div>
</div>

{% schema %}
{
  "name": "All join",
  "tag": "section",
  "class": "spaced-section spaced-section--full-width",
  "settings": [
  {
    "type": "text",
    "id": "heading",
    "default": "Talk about your brand",
    "label": "Heading"
  },
  {
    "type": "richtext",
    "id": "text",
    "default": "<p>Pair text with an image to focus on your chosen product, collection, or blog post. Add details on availability, style, or even provide a review.</p>",
    "label": "Text"
  },
  {
    "type": "checkbox",
    "id": "full_width",
    "default": false,
    "label": "t:sections.rich-text.settings.full_width.label"
  }
  ],
  "blocks": [
  {
    "type": "text",
    "name": "text",
    "settings": [
      {
        "type": "text",
        "id": "text",
        "label": "Text"
      }
    ]
  },
  {
    "type": "job",
    "name": "job",
    "settings": [
     {
        "type": "url",
        "id": "button_link",
        "label": "Button link"
      },
      {
        "type": "text",
        "id": "title",
        "label": "Title"
      },
      {
        "type": "text",
        "id": "department",
        "label": "Department"
      },
      {
        "type": "text",
        "id": "location",
        "label": "Location"
      },
      {
        "type": "text",
        "id": "mb_title",
        "label": "MB title"
      },
      {
        "type": "text",
        "id": "mb_department",
        "label": "MB Des"
      }
    ]
  }
  ],
  "presets": [
    {
      "name": "All join"
    }
  ]
}
{% endschema %}
